```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>RabbitMQ消息版本控制实践指南</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        h1, h2, h3, h4 {
            font-family: 'Noto Serif SC', serif;
            font-weight: 600;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #6e8efb 0%, #a777e3 100%);
        }
        .card-hover {
            transition: all 0.3s ease;
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .code-block {
            background-color: #2d2d2d;
            color: #f8f8f2;
            border-radius: 8px;
            padding: 1.5rem;
            position: relative;
        }
        .code-copy {
            position: absolute;
            top: 10px;
            right: 10px;
            color: #a1a1aa;
            cursor: pointer;
            transition: color 0.2s;
        }
        .code-copy:hover {
            color: #fff;
        }
        .version-tag {
            display: inline-block;
            padding: 0.25rem 0.75rem;
            border-radius: 9999px;
            font-size: 0.75rem;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .v1-tag {
            background-color: #93c5fd;
            color: #1e40af;
        }
        .v2-tag {
            background-color: #a7f3d0;
            color: #065f46;
        }
        .dropdown {
            transition: all 0.3s ease;
            max-height: 0;
            overflow: hidden;
        }
        .dropdown.active {
            max-height: 1000px;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20 px-4 md:px-8">
        <div class="max-w-6xl mx-auto">
            <div class="flex flex-col md:flex-row items-center">
                <div class="md:w-1/2 mb-10 md:mb-0">
                    <span class="inline-block px-4 py-2 bg-white bg-opacity-20 rounded-full mb-4 text-sm font-medium">技术指南</span>
                    <h1 class="text-4xl md:text-5xl font-bold mb-6 leading-tight">RabbitMQ消息版本控制实践</h1>
                    <p class="text-xl opacity-90 mb-8">确保微服务架构中消息兼容性的最佳实践</p>
                    <div class="flex items-center">
                        <div class="flex items-center mr-6">
                            <i class="fas fa-check-circle mr-2"></i>
                            <span>消息兼容性</span>
                        </div>
                        <div class="flex items-center mr-6">
                            <i class="fas fa-check-circle mr-2"></i>
                            <span>系统解耦</span>
                        </div>
                        <div class="flex items-center">
                            <i class="fas fa-check-circle mr-2"></i>
                            <span>平滑升级</span>
                        </div>
                    </div>
                </div>
                <div class="md:w-1/2">
                    <div class="bg-white bg-opacity-10 p-8 rounded-xl border border-white border-opacity-20 backdrop-blur-sm">
                        <div class="mermaid">
                            flowchart TD
                            A[生产者] -->|发布消息v1| B[Exchange v1]
                            A -->|发布消息v2| C[Exchange v2]
                            B -->|路由到| D[Queue v1]
                            C -->|路由到| E[Queue v2]
                            D --> F[消费者v1]
                            E --> G[消费者v2]
                            G --> H[版本适配器]
                            H --> I[处理逻辑]
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Main Content -->
    <div class="max-w-6xl mx-auto px-4 md:px-8 py-16">
        <!-- Introduction -->
        <section class="mb-20">
            <div class="bg-white rounded-xl shadow-lg p-8 mb-8">
                <h2 class="text-3xl font-bold mb-6 text-gray-800">为什么需要消息版本控制？</h2>
                <p class="text-gray-700 mb-6">在微服务架构或复杂系统中，服务之间的消息格式和内容会随着业务发展而不断演进。没有版本控制会导致消息兼容性问题，增加系统耦合度，影响可维护性。</p>
                
                <div class="grid md:grid-cols-3 gap-6">
                    <div class="bg-blue-50 p-6 rounded-lg border border-blue-100 card-hover">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-100 p-3 rounded-full mr-4">
                                <i class="fas fa-code-branch text-blue-600"></i>
                            </div>
                            <h3 class="text-lg font-semibold text-gray-800">系统演进</h3>
                        </div>
                        <p class="text-gray-600">随着业务发展，消息格式需要不断调整和扩展，版本控制确保平滑过渡。</p>
                    </div>
                    <div class="bg-purple-50 p-6 rounded-lg border border-purple-100 card-hover">
                        <div class="flex items-center mb-4">
                            <div class="bg-purple-100 p-3 rounded-full mr-4">
                                <i class="fas fa-puzzle-piece text-purple-600"></i>
                            </div>
                            <h3 class="text-lg font-semibold text-gray-800">服务解耦</h3>
                        </div>
                        <p class="text-gray-600">不同服务可以独立升级，无需强依赖其他服务对消息格式的即时变更。</p>
                    </div>
                    <div class="bg-green-50 p-6 rounded-lg border border-green-100 card-hover">
                        <div class="flex items-center mb-4">
                            <div class="bg-green-100 p-3 rounded-full mr-4">
                                <i class="fas fa-history text-green-600"></i>
                            </div>
                            <h3 class="text-lg font-semibold text-gray-800">可追溯性</h3>
                        </div>
                        <p class="text-gray-600">清晰的版本信息有助于问题追踪和调试，提高系统可维护性。</p>
                    </div>
                </div>
            </div>
        </section>

        <!-- Message Structure Design -->
        <section class="mb-20">
            <div class="bg-white rounded-xl shadow-lg p-8">
                <h2 class="text-3xl font-bold mb-6 text-gray-800">消息结构设计</h2>
                <p class="text-gray-700 mb-6">有效的版本控制始于合理的消息结构设计。将版本信息显式包含在消息中，为后续处理提供基础。</p>
                
                <div class="grid md:grid-cols-2 gap-8">
                    <div>
                        <h3 class="text-xl font-semibold mb-4 text-gray-800 flex items-center">
                            <i class="fas fa-file-code mr-3 text-blue-500"></i> 基本结构
                        </h3>
                        <p class="text-gray-600 mb-4">JSON格式的消息应明确包含版本字段和数据字段：</p>
                        <div class="code-block mb-6">
                            <div class="code-copy" onclick="copyCode(this)">
                                <i class="far fa-copy"></i>
                            </div>
                            <pre><code>{
  "version": "1.0",  // 明确版本号
  "data": {          // 实际业务数据
    "id": 123,
    "name": "example",
    // 其他字段...
  }
}</code></pre>
                        </div>
                        <p class="text-gray-600 mb-4">这种结构分离了元数据和业务数据，便于扩展。</p>
                    </div>
                    <div>
                        <h3 class="text-xl font-semibold mb-4 text-gray-800 flex items-center">
                            <i class="fas fa-lightbulb mr-3 text-yellow-500"></i> 设计原则
                        </h3>
                        <ul class="space-y-3 text-gray-600">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span><strong>语义化版本</strong>：遵循语义化版本规范，如MAJOR.MINOR.PATCH</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span><strong>向后兼容</strong>：添加而非修改字段，避免破坏现有消费者</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span><strong>可选字段</strong>：新字段设为可选，提供默认值处理逻辑</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
                                <span><strong>文档化</strong>：为每个版本维护详细的字段说明</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>

        <!-- Exchange and Routing -->
        <section class="mb-20">
            <div class="bg-white rounded-xl shadow-lg p-8">
                <h2 class="text-3xl font-bold mb-6 text-gray-800">交换机和路由策略</h2>
                <p class="text-gray-700 mb-6">RabbitMQ的灵活路由机制为版本控制提供了多种实现方式。</p>
                
                <div class="mb-8">
                    <h3 class="text-xl font-semibold mb-4 text-gray-800 flex items-center">
                        <i class="fas fa-exchange-alt mr-3 text-purple-500"></i> 版本隔离策略
                    </h3>
                    <div class="grid md:grid-cols-2 gap-6">
                        <div class="border-l-4 border-blue-500 pl-4">
                            <h4 class="font-medium text-gray-800 mb-2">独立交换机</h4>
                            <p class="text-gray-600 mb-2">为每个版本创建独立的交换机：</p>
                            <ul class="text-gray-600 space-y-1">
                                <li><code>order.v1.exchange</code></li>
                                <li><code>order.v2.exchange</code></li>
                            </ul>
                            <p class="text-gray-600 mt-2 text-sm">优点：完全隔离，适合大版本变更</p>
                        </div>
                        <div class="border-l-4 border-green-500 pl-4">
                            <h4 class="font-medium text-gray-800 mb-2">路由键版本化</h4>
                            <p class="text-gray-600 mb-2">在路由键中包含版本信息：</p>
                            <ul class="text-gray-600 space-y-1">
                                <li><code>order.created.v1</code></li>
                                <li><code>order.created.v2</code></li>
                            </ul>
                            <p class="text-gray-600 mt-2 text-sm">优点：灵活，适合小版本变更</p>
                        </div>
                    </div>
                </div>
                
                <div>
                    <h3 class="text-xl font-semibold mb-4 text-gray-800 flex items-center">
                        <i class="fas fa-project-diagram mr-3 text-indigo-500"></i> 路由示例
                    </h3>
                    <div class="mermaid mb-6">
                        flowchart LR
                        P[生产者] -->|routing_key='order.v1'| E[订单交换机]
                        P -->|routing_key='order.v2'| E
                        E -->|binding_key='order.v1'| Q1[订单队列v1]
                        E -->|binding_key='order.v2'| Q2[订单队列v2]
                        Q1 --> C1[消费者v1]
                        Q2 --> C2[消费者v2]
                    </div>
                    <p class="text-gray-600">通过路由键版本化，消费者可以明确订阅特定版本的消息，避免版本冲突。</p>
                </div>
            </div>
        </section>

        <!-- Consumer Implementation -->
        <section class="mb-20">
            <div class="bg-white rounded-xl shadow-lg p-8">
                <h2 class="text-3xl font-bold mb-6 text-gray-800">消费者实现策略</h2>
                <p class="text-gray-700 mb-6">消费者需要根据消息版本动态选择合适的处理逻辑。</p>
                
                <div class="mb-8">
                    <h3 class="text-xl font-semibold mb-4 text-gray-800 flex items-center">
                        <i class="fas fa-cogs mr-3 text-orange-500"></i> 适配器模式实现
                    </h3>
                    <p class="text-gray-600 mb-4">通过工厂模式创建对应版本的处理适配器：</p>
                    <div class="code-block mb-6">
                        <div class="code-copy" onclick="copyCode(this)">
                            <i class="far fa-copy"></i>
                        </div>
                        <pre><code>public interface MessageHandler {
    void handle(Message message);
}

// 版本1处理器
public class Version1Handler implements MessageHandler {
    public void handle(Message message) {
        // 解析v1格式的消息
        Version1Data data = parseV1Message(message);
        // 处理逻辑...
    }
}

// 版本2处理器
public class Version2Handler implements MessageHandler {
    public void handle(Message message) {
        // 解析v2格式的消息
        Version2Data data = parseV2Message(message);
        // 处理逻辑...
    }
}

// 处理器工厂
public class HandlerFactory {
    public static MessageHandler create(String version) {
        switch(version) {
            case "1.0": return new Version1Handler();
            case "2.0": return new Version2Handler();
            default: throw new UnsupportedVersionException(version);
        }
    }
}</code></pre>
                    </div>
                </div>
                
                <div>
                    <h3 class="text-xl font-semibold mb-4 text-gray-800 flex items-center">
                        <i class="fas fa-random mr-3 text-red-500"></i> 消息降级处理
                    </h3>
                    <div class="grid md:grid-cols-2 gap-6">
                        <div>
                            <p class="text-gray-600 mb-4">当消费者无法处理新版本消息时，可以将其路由到降级队列：</p>
                            <div class="code-block">
                                <div class="code-copy" onclick="copyCode(this)">
                                    <i class="far fa-copy"></i>
                                </div>
                                <pre><code>try {
    MessageHandler handler = HandlerFactory.create(message.getVersion());
    handler.handle(message);
} catch (UnsupportedVersionException e) {
    // 路由到降级队列
    channel.basicPublish(
        "dead-letter-exchange",
        "unprocessed.messages",
        null,
        message.getBytes()
    );
}</code></pre>
                            </div>
                        </div>
                        <div class="bg-gray-50 p-5 rounded-lg border border-gray-200">
                            <h4 class="font-medium text-gray-800 mb-3">降级队列优势</h4>
                            <ul class="text-gray-600 space-y-2">
                                <li class="flex items-start">
                                    <i class="fas fa-shield-alt text-red-400 mt-1 mr-2"></i>
                                    <span>防止消息丢失，确保数据完整性</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-clock text-yellow-500 mt-1 mr-2"></i>
                                    <span>提供缓冲时间进行消费者升级</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-chart-line text-green-500 mt-1 mr-2"></i>
                                    <span>便于监控和分析不兼容消息</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Version Upgrade Strategy -->
        <section class="mb-20">
            <div class="bg-white rounded-xl shadow-lg p-8">
                <h2 class="text-3xl font-bold mb-6 text-gray-800">版本升级策略</h2>
                <p class="text-gray-700 mb-6">系统化的升级策略能最大程度减少对生产环境的影响。</p>
                
                <div class="mb-8">
                    <h3 class="text-xl font-semibold mb-4 text-gray-800 flex items-center">
                        <i class="fas fa-calendar-alt mr-3 text-teal-500"></i> 逐步淘汰计划
                    </h3>
                    <div class="bg-gray-50 p-6 rounded-lg border border-gray-200 mb-6">
                        <div class="mermaid">
                            gantt
                            title 版本逐步淘汰时间表
                            dateFormat  YYYY-MM-DD
                            section 版本支持
                            v1支持 :active, a1, 2023-01-01, 2023-06-30
                            v2支持 :a2, after a1, 90d
                            section 过渡期
                            双版本运行 :a3, 2023-04-01, 2023-07-31
                            section 淘汰
                            v1下线 :a4, 2023-08-01, 7d
                        </div>
                    </div>
                    <p class="text-gray-600">给消费者足够的迁移时间，避免强制升级带来的系统风险。</p>
                </div>
                
                <div class="grid md:grid-cols-2 gap-8">
                    <div>
                        <h3 class="text-xl font-semibold mb-4 text-gray-800 flex items-center">
                            <i class="fas fa-book mr-3 text-blue-400"></i> 文档化规范
                        </h3>
                        <ul class="text-gray-600 space-y-3">
                            <li class="flex items-start">
                                <i class="fas fa-file-alt text-blue-400 mt-1 mr-2"></i>
                                <span><strong>变更日志</strong>：记录每个版本的字段变更和影响范围</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-code-branch text-purple-400 mt-1 mr-2"></i>
                                <span><strong>兼容性矩阵</strong>：明确生产者与消费者的版本兼容关系</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-exclamation-triangle text-yellow-500 mt-1 mr-2"></i>
                                <span><strong>弃用声明</strong>：提前通知旧版本的下线计划</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-tools text-gray-500 mt-1 mr-2"></i>
                                <span><strong>迁移指南</strong>：提供详细的升级步骤和示例代码</span>
                            </li>
                        </ul>
                    </div>
                    <div>
                        <h3 class="text-xl font-semibold mb-4 text-gray-800 flex items-center">
                            <i class="fas fa-vial mr-3 text-green-500"></i> 测试策略
                        </h3>
                        <div class="space-y-4">
                            <div>
                                <h4 class="font-medium text-gray-800 mb-2 flex items-center">
                                    <span class="version-tag v1-tag mr-2">v1</span>
                                    <span class="version-tag v2-tag">v2</span>
                                    <span class="ml-2">双版本测试</span>
                                </h4>
                                <p class="text-gray-600">确保新版本消费者能同时处理新旧版本消息，验证向后兼容性。</p>
                            </div>
                            <div>
                                <h4 class="font-medium text-gray-800 mb-2">性能基准</h4>
                                <p class="text-gray-600">比较不同版本处理逻辑的性能差异，避免升级导致性能下降。</p>
                            </div>
                            <div>
                                <h4 class="font-medium text-gray-800 mb-2">回滚测试</h4>
                                <p class="text-gray-600">验证在升级失败时能安全回退到旧版本。</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Monitoring and Feedback -->
        <section class="mb-20">
            <div class="bg-white rounded-xl shadow-lg p-8">
                <h2 class="text-3xl font-bold mb-6 text-gray-800">监控与反馈</h2>
                <p class="text-gray-700 mb-6">完善的监控体系是版本控制成功实施的保障。</p>
                
                <div class="grid md:grid-cols-3 gap-6 mb-8">
                    <div class="bg-indigo-50 p-6 rounded-lg border border-indigo-100 card-hover">
                        <div class="flex items-center mb-3">
                            <i class="fas fa-tachometer-alt text-indigo-600 mr-3"></i>
                            <h3 class="text-lg font-semibold text-gray-800">版本分布</h3>
                        </div>
                        <p class="text-gray-600">跟踪各版本消息的流量比例，了解版本迁移进度。</p>
                    </div>
                    <div class="bg-pink-50 p-6 rounded-lg border border-pink-100 card-hover">
                        <div class="flex items-center mb-3">
                            <i class="fas fa-exclamation-circle text-pink-600 mr-3"></i>
                            <h3 class="text-lg font-semibold text-gray-800">错误率</h3>
                        </div>
                        <p class="text-gray-600">监控各版本消息的处理错误率，及时发现兼容性问题。</p>
                    </div>
                    <div class="bg-amber-50 p-6 rounded-lg border border-amber-100 card-hover">
                        <div class="flex items-center mb-3">
                            <i class="fas fa-clock text-amber-600 mr-3"></i>
                            <h3 class="text-lg font-semibold text-gray-800">处理延迟</h3>
                        </div>
                        <p class="text-gray-600">比较不同版本的处理延迟，确保性能达标。</p>
                    </div>
                </div>
                
                <div>
                    <h3 class="text-xl font-semibold mb-4 text-gray-800 flex items-center">
                        <i class="fas fa-chart-bar mr-3 text-blue-500"></i> 监控面板示例
                    </h3>
                    <div class="bg-gray-800 rounded-lg p-4 mb-4">
                        <div class="flex items-center justify-between mb-4">
                            <div class="flex items-center">
                                <div class="w-3 h-3 rounded-full bg-green-500 mr-2"></div>
                                <span class="text-gray-300 font-medium">消息版本监控</span>
                            </div>
                            <div class="flex space-x-2">
                                <span class="text-xs px-2 py-1 bg-gray-700 rounded text-gray-300">24h</span>
                                <span class="text-xs px-2 py-1 bg-gray-700 rounded text-gray-300">7d</span>
                                <span class="text-xs px-2 py-1 bg-blue-600 rounded text-white">30d</span>
                            </div>
                        </div>
                        <div class="grid grid-cols-3 gap-4 text-center mb-4">
                            <div class="bg-gray-700 rounded p-3">
                                <div class="text-2xl font-bold text-green-400 mb-1">78%</div>
                                <div class="text-xs text-gray-400">v2采用率</div>
                            </div>
                            <div class="bg-gray-700 rounded p-3">
                                <div class="text-2xl font-bold text-yellow-400 mb-1">22%</div>
                                <div class="text-xs text-gray-400">v1剩余</div>
                            </div>
                            <div class="bg-gray-700 rounded p-3">
                                <div class="text-2xl font-bold text-red-400 mb-1">0.3%</div>
                                <div class="text-xs text-gray-400">错误率</div>
                            </div>
                        </div>
                        <div class="h-40 bg-gray-700 rounded flex items-center justify-center text-gray-500">
                            [消息版本趋势图表区域]
                        </div>
                    </div>
                    <p class="text-gray-600">通过可视化监控，团队可以清晰了解版本迁移状态，做出数据驱动的决策。</p>
                </div>
            </div>
        </section>

        <!-- Summary -->
        <section class="mb-20">
            <div class="bg-gradient-to-r from-blue-50 to-purple-50 rounded-xl shadow-lg p-8 border border-blue-100">
                <h2 class="text-3xl font-bold mb-6 text-gray-800">关键要点总结</h2>
                <div class="grid md:grid-cols-2 gap-8">
                    <div>
                        <h3 class="text-xl font-semibold mb-4 text-gray-800 flex items-center">
                            <i class="fas fa-check-circle mr-3 text-green-500"></i> 实施步骤
                        </h3>
                        <ol class="text-gray-700 space-y-3">
                            <li class="flex items-start">
                                <span class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 flex-shrink-0">1</span>
                                <span>在消息结构中显式包含版本信息</span>
                            </li>
                            <li class="flex items-start">
                                <span class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 flex-shrink-0">2</span>
                                <span>通过交换机或路由键实现版本隔离</span>
                            </li>
                            <li class="flex items-start">
                                <span class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 flex-shrink-0">3</span>
                                <span>使用适配器模式处理多版本消息</span>
                            </li>
                            <li class="flex items-start">
                                <span class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 flex-shrink-0">4</span>
                                <span>建立降级机制处理不兼容消息</span>
                            </li>
                            <li class="flex items-start">
                                <span class="bg-blue-100 text-blue-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 flex-shrink-0">5</span>
                                <span>制定清晰的版本升级和淘汰计划</span>
                            </li>
                        </ol>
                    </div>
                    <div>
                        <h3 class="text-xl font-semibold mb-4 text-gray-800 flex items-center">
                            <i class="fas fa-star mr-3 text-yellow-500"></i> 最佳实践
                        </h3>
                        <ul class="text-gray-700 space-y-3">
                            <li class="flex items-start">
                                <i class="fas fa-angle-right text-blue-500 mt-1 mr-2"></i>
                                <span>保持消息结构的向后兼容性</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-angle-right text-blue-500 mt-1 mr-2"></i>
                                <span>为每个大版本维护独立的处理逻辑</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-angle-right text-blue-500 mt-1 mr-2"></i>
                                <span>提供足够长的过渡期和清晰的迁移文档</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-angle-right text-blue-500 mt-1 mr-2"></i>
                                <span>建立全面的监控和告警机制</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-angle-right text-blue-500 mt-1 mr-2"></i>
                                <span>定期审查和清理不再支持的版本</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>
    </div>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-400 py-12 px-4">
        <div class="max-w-6xl mx-auto">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-6 md:mb-0">
                    <h3 class="text-xl font-medium text-white mb-2">技术小馆</h3>
                    <p class="text-sm">专业的开发者知识分享平台</p>
                </div>
                <div>
                    <a href="http://www.yuque.com/jtostring" class="text-blue-400 hover:text-blue-300 transition-colors flex items-center">
                        <i class="fas fa-external-link-alt mr-2"></i>
                        <span>访问我们的语雀空间</span>
                    </a>
                </div>
            </div>
            <div class="border-t border-gray-800 mt-8 pt-8 text-sm text-center">
                © 2023 技术小馆. 保留所有权利.
            </div>
        </div>
    </footer>

    <script>
        // 初始化Mermaid图表
        mermaid.initialize({
            startOnLoad: true,
            theme: 'default',
            flowchart: {
                useMaxWidth: true,
                htmlLabels: true,
                curve: 'basis'
            },
            gantt: {
                axisFormat: '%Y-%m-%d'
            }
        });

        // 代码复制功能
        function copyCode(button) {
            const codeBlock = button.parentElement;
            const code = codeBlock.querySelector('code').innerText;
            navigator.clipboard.writeText(code).then(() => {
                const icon = button.querySelector('i');
                icon.classList.remove('fa-copy');
                icon.classList.add('fa-check');
                setTimeout(() => {
                    icon.classList.remove('fa-check');
                    icon.classList.add('fa-copy');
                }, 2000);
            });
        }

        // 下拉展开效果
        document.querySelectorAll('.dropdown-toggle').forEach(toggle => {
            toggle.addEventListener('click', () => {
                const dropdown = toggle.nextElementSibling;
                dropdown.classList.toggle('active');
                const icon = toggle.querySelector('i');
                icon.classList.toggle('fa-chevron-down');
                icon.classList.toggle('fa-chevron-up');
            });
        });

        // 卡片悬停效果
        document.querySelectorAll('.card-hover').forEach(card => {
            card.addEventListener('mouseenter', () => {
                card.style.transition = 'all 0.3s ease';
            });
        });
    </script>
</body>
</html>
```